#include <gtk/gtk.h>
#include "windows/window_index.h"
#include "common/utils.h"

static void create_first_window(GtkApplication *app, gpointer user_data)
{
    GtkWidget *window = window_index_new();
    gtk_window_set_application(GTK_WINDOW(window), app);
    gtk_window_present(GTK_WINDOW(window));
}

int main(int argc, char **argv)
{
    gtk_init();

    g_setenv("GTK_A11Y", "none", 1);
    gtk_window_set_default_icon_name("com.qq.weixin.deepin");
    utils_load_css_from_resource("/src/assets/styles/common.css");
    utils_load_css_from_resource("/src/assets/styles/test.css");
    GtkApplication *app = gtk_application_new("com.example.GtkApplication", G_APPLICATION_DEFAULT_FLAGS);
    g_signal_connect(app, "activate", G_CALLBACK(create_first_window), NULL);
    int status = g_application_run(G_APPLICATION(app), argc, argv);
    g_object_unref(app);
    return status;
}
